<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
       let obj={
        uname:'张三',
        age:'20',
        message:['190','140','11111'],
        family:{
          mather:'张三妈',
          father:'张三爸',
        },
       }
       const jbo={}
        function diGui(newObj,oldObj){
           for(let k in oldObj){
            if(oldObj[k] instanceof Array){
              newObj[k] =[]
              diGui(newObj[k],oldObj[k])
            }else if(oldObj[k] instanceof Object){
              newObj[k]={}
              diGui(newObj[k],oldObj[k])
            }else{
              newObj[k]=oldObj[k]
            }

        }
        return newObj
    }
      diGui(jbo,obj)
        // console.log(res);'
        jbo.message[0]='195'
        jbo.uname ='张三疯'
        console.log(obj);
        console.log(jbo);
  </script>
</body>

</html>